<form action="" method="post" id="attendance">
    @if($info)
    <div class="absence-work">
        <div class="weui-cells__title">
            <p class="yellow-p icon-change"><span class="cir-span"></span>缺勤</p>
        </div>
        <ul>
            <li >
                <label class="input-label" for="leave-absence">事假</label>
                <input class="weui-input" id="leave-absence" type="text" value="{{$info->business or 0}}天" name="business">
            </li>
            <li>
                <label class="input-label" for="sick-leave">病假</label>
                <input class="weui-input" id="sick-leave" type="text" value="{{$info->sick or 0}}天"name="sick">
            </li>
            <li class="min-li">
                <label class="input-label" for="date">迟到</label>
                <input class="weui-switch come-late" type="checkbox"name="late" value="1" @if($info->late)checked @endif>
                <label class="switch-label"></label>
            </li>
            <li class="min-li">
                <label class="input-label" for="date">早退</label>
                <input class="weui-switch come-late" type="checkbox"name="early" value="1" @if($info->early)checked @endif>
                <label class="switch-label"></label>
            </li>
            <li class="min-li">
                <label class="input-label" for="date">旷工</label>
                <input class="weui-switch come-late" type="checkbox"name="absenteeism" value="1"@if($info->absenteeism)checked @endif>
                <label class="switch-label"></label>
            </li>
        </ul>
    </div>

    <div>
        <div class="weui-cells__title">
            <p class="blue-p icon-change"><span class="cir-span"></span>公假</p>
        </div>
        <div class="weui-flex cells_radio">
            <div class="weui-flex__item">
                <span>年假</span>
                <input class="radio" type="radio" name="public" value="1" @if($info->public==1)checked @endif>
                <label class="label"></label>
            </div>
            <div class="weui-flex__item">
                <span>婚假</span>
                <input class="radio" type="radio" name="public" value="2" @if($info->public==2)checked @endif>
                <label class="label"></label>
            </div>
            <div class="weui-flex__item">
                <span>其它</span>
                <input class="radio" type="radio" name="public" value="3" @if($info->public==3)checked @endif>
                <label class="label"></label>
            </div>
        </div>
    </div>
    <div>
        <div class=" weui-cells__title">
            <p class="green-p icon-change"><sapn class="cir-span"></sapn>加班</p>
        </div>
        <div class="overtime-work">
            <input class="weui-input" id="overtime-work" type="text" value="{{$info->overtime or 0}}小时"  name="overtime">
            <label class="input-label" for="hour-time">小时</label>
        </div>
    </div>
    <div class="weui-cells_form">
        <p class="cells__title">备注</p>
        <div class="weui-cell">
            <textarea class="weui-textarea" placeholder="请输入说明" rows="3" name="remark" >{{$info->remark}}</textarea>
        </div>
    </div>
        @else
        <div class="absence-work">
            <div class="weui-cells__title">
                <p class="yellow-p icon-change"><span class="cir-span"></span>缺勤</p>
            </div>
            <ul>
                <li >
                    <label class="input-label" for="leave-absence">事假</label>
                    <input class="weui-input" id="leave-absence" type="text" value="0天"  name="business">
                </li>
                <li>
                    <label class="input-label" for="sick-leave">病假</label>
                    <input class="weui-input" id="sick-leave" type="text" value="0天"  name="sick" >
                </li>
                <li class="min-li">
                    <label class="input-label" for="date">迟到</label>
                    <input class="weui-switch come-late" type="checkbox"   name="late" value="1">
                    <label class="switch-label"></label>
                </li>
                <li class="min-li">
                    <label class="input-label" for="date">早退</label>
                    <input class="weui-switch come-late" type="checkbox"   name="early" value="1">
                    <label class="switch-label"></label>
                </li>
                <li class="min-li">
                    <label class="input-label" for="date">旷工</label>
                    <input class="weui-switch come-late" type="checkbox"   name="absenteeism" value="1">
                    <label class="switch-label"></label>
                </li>
            </ul>
        </div>
        <div>
            <div class="weui-cells__title">
                <p class="blue-p icon-change"><span class="cir-span"></span>公假</p>
            </div>
            <div class="weui-flex cells_radio">
                <div class="weui-flex__item">
                    <span>年假</span>
                    <input class="radio" type="radio" name="public" value="1">
                    <label class="label"></label>
                </div>
                <div class="weui-flex__item">
                    <span>婚假</span>
                    <input class="radio" type="radio" name="public" value="2">
                    <label class="label"></label>
                </div>
                <div class="weui-flex__item">
                    <span>其它</span>
                    <input class="radio" type="radio" name="public" value="3">
                    <label class="label"></label>
                </div>
            </div>
        </div>
        <div>
            <div class="weui-cells__title">
                <p class="green-p icon-change"><span class="cir-span"></span>加班</p>
            </div>
            <div class="overtime-work">
                <input class="weui-input" id="overtime-work" type="text" value="0小时"  name="overtime" >
                <label class="input-label" for="hour-time">小时</label>
            </div>
        </div>
        <div class="weui-cells_form">
            <p class="cells__title">备注</p>
            <div class="weui-cell">
                <textarea class="weui-textarea" placeholder="请输入说明" rows="3" name="remark" ></textarea>
            </div>
        </div>
    @endif
    <div class="sub-btn">
        <button class="weui-btn weui-btn_color submit-btn" type="button" onclick="ajax_attendance_update({{$id}})">提交</button>
    </div>
</form>